package com.mrjoew.weekend;

import com.mrjoew.weekend.repositories.BaseRepositoryImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.kafka.core.KafkaTemplate;
import springfox.documentation.oas.annotations.EnableOpenApi;

@EnableOpenApi
@ConfigurationPropertiesScan(basePackages = {
        ApplicationConstant.BASE_PACKAGE.SCAFFOLD_CONFIGURATION, ApplicationConstant.BASE_PACKAGE.WE_CHAT
})
@ServletComponentScan(basePackages = {
        ApplicationConstant.BASE_PACKAGE.SCAFFOLD_FILTER
})
@EnableJpaRepositories(repositoryBaseClass = BaseRepositoryImpl.class)
@Slf4j
@SpringBootApplication
public class WeekendApplication {

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(WeekendApplication.class);
        application.setBannerMode(Banner.Mode.OFF);
        application.run(args);

        log.info("============================== Weekend Application Started! ==============================");
    }
}